/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

export const contentRouter = {
  path: '/content',
  component: Layout,
  redirect: '/content/list',
  name: 'Content',
  meta: { title: '内容管理', icon: 'el-icon-document', roles: false },
  children: [
    {
      path: 'tags',
      name: 'ContentTags',
      component: () => import('@/views/content/tags'),
      meta: { title: '分类管理', roles: false }
    },
    {
      path: 'list',
      name: 'ContentList',
      component: () => import('@/views/content/list'),
      meta: { title: '文章列表', roles: false }
    },
    {
      path: 'create',
      name: 'CreateArticle',
      component: () => import('@/views/content/create'),
      meta: { title: '添加文章', activeMenu: '/content/list', roles: false },
      hidden: true
    },
    {
      path: 'edit/:id',
      name: 'EditArticle',
      component: () => import('@/views/content/edit'),
      meta: { title: '编辑文章', activeMenu: '/content/list', roles: false },
      hidden: true
    }
  ]
}

export const contentViews = {
  id: 'Content',
  name: '内容管理',
  children: [
    {
      id: 'ContentTags',
      name: '分类管理'
    },
    {
      id: 'ContentList',
      name: '文章列表'
    },
    {
      id: 'CreateArticle',
      name: '添加文章'
    },
    {
      id: 'EditArticle',
      name: '编辑文章'
    }
  ]
}

